package com.ifood.common.enums;

public enum DelFlagEnum {
    normal("0", "正常"),
    del("2", "删除");

    private final String code;
    private final String value;

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    DelFlagEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public static String getValue(String code) {
        for (DelFlagEnum value : DelFlagEnum.values()) {
            if (value.code.equals(code)) {
                return value.value;
            }
        }
        return "";
    }
}
